OptionLookback
OptionLookback records are published by the SurfaceModelServer and represent a stable frame lookback window on the option market (typically about 10 minutes)
METADATA
Attribute | Value |
---|---|
Topic | 1000-analytics |
MLink Token | SRMLinkAnalytics |
Product | SRAnalytics |
accessType | SELECT |
Table Definition
Field | Type | Key | Default Value | Comment |
---|---|---|---|---|
okey_at | enum - AssetType | PRI | 'None' | |
okey_ts | enum - TickerSrc | PRI | 'None' | |
okey_tk | VARCHAR(12) | PRI | '' | |
okey_yr | SMALLINT UNSIGNED | PRI | 0 | |
okey_mn | TINYINT UNSIGNED | PRI | 0 | |
okey_dy | TINYINT UNSIGNED | PRI | 0 | |
okey_xx | DOUBLE | PRI | 0 | |
okey_cp | enum - CallPut | PRI | 'Call' | |
tradeDate | DATE | '1900-01-01' | ||
uPrc | DOUBLE | 0 | ||
de | FLOAT | 0 | from SR surface volatility | |
ve | FLOAT | 0 | ||
emaBidPrc | FLOAT | 0 | ||
emaAskPrc | FLOAT | 0 | ||
emaBidSize | FLOAT | 0 | ||
emaAskSize | FLOAT | 0 | ||
emaSPrc | FLOAT | 0 | ||
emaSVol | FLOAT | 0 | ||
emaSDiv | FLOAT | 0 | ||
emaAtmVol | FLOAT | 0 | ||
timestamp | DATETIME(6) | '1900-01-01 00:00:00.000000' | last record update time |
PRIMARY KEY DEFINITION (Unique)
Field | Sequence |
---|---|
okey_tk | 1 |
okey_yr | 2 |
okey_mn | 3 |
okey_dy | 4 |
okey_xx | 5 |
okey_cp | 6 |
okey_at | 7 |
okey_ts | 8 |
CREATE TABLE EXAMPLE QUERY
CREATE TABLE `SRAnalytics`.`MsgOptionLookback` (
`okey_at` ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') NOT NULL DEFAULT 'None',
`okey_ts` ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') NOT NULL DEFAULT 'None',
`okey_tk` VARCHAR(12) NOT NULL DEFAULT '',
`okey_yr` SMALLINT UNSIGNED NOT NULL DEFAULT 0,
`okey_mn` TINYINT UNSIGNED NOT NULL DEFAULT 0,
`okey_dy` TINYINT UNSIGNED NOT NULL DEFAULT 0,
`okey_xx` DOUBLE NOT NULL DEFAULT 0,
`okey_cp` ENUM('Call','Put','Pair') NOT NULL DEFAULT 'Call',
`tradeDate` DATE NOT NULL DEFAULT '1900-01-01',
`uPrc` DOUBLE NOT NULL DEFAULT 0,
`de` FLOAT NOT NULL DEFAULT 0 COMMENT 'from SR surface volatility',
`ve` FLOAT NOT NULL DEFAULT 0,
`emaBidPrc` FLOAT NOT NULL DEFAULT 0,
`emaAskPrc` FLOAT NOT NULL DEFAULT 0,
`emaBidSize` FLOAT NOT NULL DEFAULT 0,
`emaAskSize` FLOAT NOT NULL DEFAULT 0,
`emaSPrc` FLOAT NOT NULL DEFAULT 0,
`emaSVol` FLOAT NOT NULL DEFAULT 0,
`emaSDiv` FLOAT NOT NULL DEFAULT 0,
`emaAtmVol` FLOAT NOT NULL DEFAULT 0,
`timestamp` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000' COMMENT 'last record update time',
PRIMARY KEY USING HASH (`okey_tk`,`okey_yr`,`okey_mn`,`okey_dy`,`okey_xx`,`okey_cp`,`okey_at`,`okey_ts`)
) ENGINE=SRSE DEFAULT CHARSET=LATIN1 COMMENT='OptionLookback records are published by the SurfaceModelServer and represent a stable frame lookback window on the option market (typically about 10 minutes)';
SELECT TABLE EXAMPLE QUERY
SELECT
`okey_at`,
`okey_ts`,
`okey_tk`,
`okey_yr`,
`okey_mn`,
`okey_dy`,
`okey_xx`,
`okey_cp`,
`tradeDate`,
`uPrc`,
`de`,
`ve`,
`emaBidPrc`,
`emaAskPrc`,
`emaBidSize`,
`emaAskSize`,
`emaSPrc`,
`emaSVol`,
`emaSDiv`,
`emaAtmVol`,
`timestamp`
FROM `SRAnalytics`.`MsgOptionLookback`
WHERE
/* Replace with a ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') */
`okey_at` = 'None'
AND
/* Replace with a ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') */
`okey_ts` = 'None'
AND
/* Replace with a VARCHAR(12) */
`okey_tk` = 'Example_okey_tk'
AND
/* Replace with a SMALLINT UNSIGNED */
`okey_yr` = 123
AND
/* Replace with a TINYINT UNSIGNED */
`okey_mn` = 1
AND
/* Replace with a TINYINT UNSIGNED */
`okey_dy` = 1
AND
/* Replace with a DOUBLE */
`okey_xx` = 4.56
AND
/* Replace with a ENUM('Call','Put','Pair') */
`okey_cp` = 'Call';
Doc Columns Query
SELECT * FROM SRAnalytics.doccolumns WHERE TABLE_NAME='OptionLookback' ORDER BY ordinal_position ASC;